Set dbTest = MyWorkspace.OpenDatabase(sTestPath, _
False, False, ";PWD=")
Select Case Err.Number
Case 0: Exit For
Case 3050:
If iCount = 20 Then
MsgBox "The Test database is locked by another user. If you cannot get into the program after a few tries, then check to see if another user is editing the Access database or if a user is locked in this program.", vbCritical + vbOKOnly, "Database is locked"